package com.cal.utms.entity;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the user_group_screen database table.
 * 
 */
@Embeddable
public class UserGroupScreenPK implements Serializable {
	// default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name = "USER_GROUP_ID", insertable = false, updatable = false)
	private int userGroupId;

	@Column(name = "SCREEN_ID", insertable = false, updatable = false)
	private int screenId;

	public UserGroupScreenPK() {
	}

	public int getUserGroupId() {
		return this.userGroupId;
	}

	public void setUserGroupId(int userGroupId) {
		this.userGroupId = userGroupId;
	}

	public int getScreenId() {
		return this.screenId;
	}

	public void setScreenId(int screenId) {
		this.screenId = screenId;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof UserGroupScreenPK)) {
			return false;
		}
		UserGroupScreenPK castOther = (UserGroupScreenPK) other;
		return (this.userGroupId == castOther.userGroupId) && (this.screenId == castOther.screenId);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.userGroupId;
		hash = hash * prime + this.screenId;

		return hash;
	}
}